function onUse(cid, item, fromPosition, itemEx, toPosition) local storage = 18597 if getPlayerStorageValue(cid, 18597) <= 0 then doRemoveItem(item.uid, 1) doSendMagicEffect(getThingPos(cid), CONST_ME_MAGIC_BLUE) setPlayerStorageValue(cid, 18597, 1) doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "Parabens, voce se tornou um Modd Player") return true else doSendPlayerCancel(cid, "Voce ja e um Modd Player.") return true end end end
Tente assim, caso funcione, foi editado apenas em:
if getPlayerStorageValue(cid, storage) <= 0 then Por if getPlayerStorageValue(cid, 18597) <= 0 then E setPlayerStorageValue(cid, storage, getPlayerStorageValue(cid, storage)+18597) Por setPlayerStorageValue(cid, 18597, 1)









info
Grupo: Barão
Registrado: 13/07/15
Posts: 242
Reputação: +56
Char no Tibia: Sekk
Bom gente, criei um outro tópico, pedindo ajuda em um movement, em que se o player tiver a storage 18597, ele passa pelo tile, se não tiver a storage, ele não passa, ai vai o script do movement:
Criei uma action para quando o player usar X item, adiciona a storage à ele, está funcionando normalmente, porém quando o player tem a storage, e vai no tile, aparece um erro no distro:
Editado Agosto 30 por jvcasarin